$joo_compat=false
load("jooscript.js")

cl = $buildClass(
   "test",
   [],
   function(_class){
       this.x = 1
       this.y = 2

       this.__new__ = function(self){
           self.z = 3
       }

       this.getXYZ = function(self) self.x * self.y * self.z

       _class.__init__ = function(){
           this.className = "Test"
       }
   },{
       "y": Type.NUMBER,
       "__new__": {
           type: Type.FUNCTION,
           constructor: true
       },
       "getXYZ": Type.FUNCTION
   }
)

c = cl()
print(cl.className, c.x, c.y, c.z, c.getXYZ())
